package com.pioneer.web.book.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.pioneer.web.book.domain.BorrowRecord;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
* @author aom-star@outlook.com
* @description 针对表【borrow_record】的数据库操作Service
* @createDate 2025-05-18 10:48:32
*/
public interface IBorrowRecordService extends IService<BorrowRecord> {

    void borrowBook(Long bookId);

    List<BorrowRecord> selectRecordByUserID(Long userId, String status);

    @Transactional(rollbackFor = Exception.class)
    boolean returnBook(List<Long> list);

    @Transactional(rollbackFor = Exception.class)
    void cleanOldRecords();

    @Transactional(rollbackFor = Exception.class)
    void updateOverdueStatus();

    BorrowRecord getBorrowRecordById(Long borrowRecordId);
}
